package cc.kigh.system.remote;

import cc.kigh.common.core.domain.entity.SysUser;
import cc.kigh.system.service.ISysUserService;
import cn.hutool.core.collection.CollUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @author gylang
 * data 2022/3/14
 */
@Service
public class ISysUserRemoteImpl implements ISysUserRemote {

    @Autowired
    private ISysUserService userService;

    @Override
    public List<SysUser> selectUserList(SysUser user) {
        return userService.selectUserList(user);
    }

    @Override
    public SysUser selectUserById(long userId) {
        return userService.selectUserById(userId);
    }

    @Override
    public List<SysUser> selectUserByIds(Collection<Long> userIds) {
        if (CollUtil.isEmpty(userIds)) {
            return new ArrayList<>();
        }
        return userService.selectUserByIds(userIds);
    }
}
